Skip to content

Bump rails-html-sanitizer from 1.6.0 to 1.6.1 #7

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

dependabot[bot]
Copy link

@dependabot dependabot bot commented on behalf of github Dec 2, 2024

Bumps rails-html-sanitizer from 1.6.0 to 1.6.1.

Release notes

Sourced from rails-html-sanitizer's releases.

1.6.1 / 2024-12-02

This is a performance and security release which addresses several possible XSS vulnerabilities.

  • The dependency on Nokogiri is updated to v1.15.7 or >=1.16.8.

    This change addresses CVE-2024-53985 (GHSA-w8gc-x259-rc7x).

    Mike Dalessio

  • Disallowed tags will be pruned when they appear in foreign content (i.e. SVG or MathML content), regardless of the prune: option value. Previously, disallowed tags were "stripped" unless the gem was configured with the prune: true option.

    The CVEs addressed by this change are:

    Mike Dalessio

  • The tags "noscript", "mglyph", and "malignmark" will not be allowed, even if explicitly added to the allowlist. If applications try to allow any of these tags, a warning is emitted and the tags are removed from the allow-list.

    The CVEs addressed by this change are:

    Please note that we may restore support for allowing "noscript" in a future release. We do not expect to ever allow "mglyph" or "malignmark", though, especially since browser support is minimal for these tags.

    Mike Dalessio

  • Improve performance by eliminating needless operations on attributes that are being removed. #188

    Mike Dalessio

Changelog

Sourced from rails-html-sanitizer's changelog.

1.6.1 / 2024-12-02

This is a performance and security release which addresses several possible XSS vulnerabilities.

  • The dependency on Nokogiri is updated to v1.15.7 or >=1.16.8.

    This change addresses CVE-2024-53985 (GHSA-w8gc-x259-rc7x).

    Mike Dalessio

  • Disallowed tags will be pruned when they appear in foreign content (i.e. SVG or MathML content), regardless of the prune: option value. Previously, disallowed tags were "stripped" unless the gem was configured with the prune: true option.

    The CVEs addressed by this change are:

    Mike Dalessio

  • The tags "noscript", "mglyph", and "malignmark" will not be allowed, even if explicitly added to the allowlist. If applications try to allow any of these tags, a warning is emitted and the tags are removed from the allow-list.

    The CVEs addressed by this change are:

    Please note that we may restore support for allowing "noscript" in a future release. We do not expect to ever allow "mglyph" or "malignmark", though, especially since browser support is minimal for these tags.

    Mike Dalessio

  • Improve performance by eliminating needless operations on attributes that are being removed. #188

    Mike Dalessio

Commits
  • 5e96b19 version bump to v1.6.1
  • 383cc7c doc: update CHANGELOG with assigned CVEs
  • a7b0cfe Combine the noscript/mglyph prevention blocks
  • 5658335 Merge branch 'h1-2509647-noscript' into flavorjones-2024-security-fixes
  • 65fb72f Merge branch 'h1-2519936-mglyph-foster-parenting' into flavorjones-2024-secur...
  • 3fe22a8 Merge branch 'h1-2519936-foreign-ns-confusion' into flavorjones-2024-security...
  • d7a94c1 Merge branch 'h1-2503220-nokogiri-serialization' into flavorjones-2024-securi...
  • 3fd6e65 doc: update CHANGELOG
  • 1625173 fix: disallow 'noscript' from safe lists
  • a0a3e8b fix: disallow 'mglyph' and 'malignmark' from safe lists
  • Additional commits viewable in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    You can disable automated security fix PRs for this repo from the Security Alerts page.

Summary by Sourcery

Bump rails-html-sanitizer from version 1.6.0 to 1.6.1 to address security vulnerabilities and improve performance. Update Nokogiri dependency to mitigate CVE-2024-53985. Modify tag handling to prune disallowed tags in foreign content and disallow certain tags from being added to the allowlist, addressing multiple CVEs. Enhance performance by removing redundant operations on attributes.

Bug Fixes:

  • Address several XSS vulnerabilities by updating the dependency on Nokogiri and modifying tag handling.

Enhancements:

  • Improve performance by eliminating unnecessary operations on attributes that are being removed.

Bumps [rails-html-sanitizer](https://github.com/rails/rails-html-sanitizer) from 1.6.0 to 1.6.1.
- [Release notes](https://github.com/rails/rails-html-sanitizer/releases)
- [Changelog](https://github.com/rails/rails-html-sanitizer/blob/main/CHANGELOG.md)
- [Commits](rails/rails-html-sanitizer@v1.6.0...v1.6.1)

---
updated-dependencies:
- dependency-name: rails-html-sanitizer
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
@dependabot dependabot bot added the dependencies Pull requests that update a dependency file label Dec 2, 2024
Copy link

sourcery-ai bot commented Dec 2, 2024

Reviewer's Guide by Sourcery

This is a security and performance update for the rails-html-sanitizer gem from version 1.6.0 to 1.6.1. The update addresses multiple XSS vulnerabilities and includes performance improvements for attribute handling.

No diagrams generated as the changes look simple and do not need a visual representation.

File-Level Changes

Change Details Files
Security fixes for XSS vulnerabilities
  • Updated Nokogiri dependency to v1.15.7 or >=1.16.8 to address CVE-2024-53985
  • Modified handling of disallowed tags in SVG/MathML content to always prune them regardless of prune option
  • Blocked 'noscript', 'mglyph', and 'malignmark' tags from being allowlisted
Gemfile.lock
Performance optimization for attribute handling
  • Eliminated unnecessary operations on attributes that are being removed
Gemfile.lock

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time. You can also use
    this command to specify where the summary should be inserted.

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have skipped reviewing this pull request. It seems to have been created by a bot (hey, dependabot[bot]!). We assume it knows what it's doing!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants